[FLINK-38804][runtime] Ensure channelStateWriter is closed after the inputGates#27375
Merged
1996fanrui merged 1 commit intoapache:masterfrom Jan 13, 2026
Merged
[FLINK-38804][runtime] Ensure channelStateWriter is closed after the inputGates#273751996fanrui merged 1 commit intoapache:masterfrom
1996fanrui merged 1 commit intoapache:masterfrom
Conversation
Collaborator
2333f28 to
0469fec
Compare
Contributor
Author
|
@flinkbot run azure |
davidradl
reviewed
Jan 7, 2026
flink-runtime/src/main/java/org/apache/flink/runtime/execution/Environment.java
Show resolved
Hide resolved
davidradl
reviewed
Jan 7, 2026
flink-runtime/src/main/java/org/apache/flink/runtime/taskmanager/RuntimeEnvironment.java
Outdated
Show resolved
Hide resolved
davidradl
reviewed
Jan 7, 2026
flink-runtime/src/main/java/org/apache/flink/runtime/taskmanager/Task.java
Show resolved
Hide resolved
1996fanrui
reviewed
Jan 11, 2026
Member
1996fanrui
left a comment
There was a problem hiding this comment.
Thanks @Efrat19 for the fix!
Overall LGTM, I only left some minor comments, please take a look when you are available, thanks
flink-runtime/src/main/java/org/apache/flink/runtime/taskmanager/RuntimeEnvironment.java
Outdated
Show resolved
Hide resolved
flink-runtime/src/test/java/org/apache/flink/runtime/taskmanager/TaskTest.java
Outdated
Show resolved
Hide resolved
flink-runtime/src/main/java/org/apache/flink/runtime/taskmanager/Task.java
Outdated
Show resolved
Hide resolved
0469fec to
01fde62
Compare
1996fanrui
reviewed
Jan 12, 2026
flink-runtime/src/test/java/org/apache/flink/runtime/taskmanager/TaskTest.java
Outdated
Show resolved
Hide resolved
01fde62 to
c2be532
Compare
Contributor
Author
|
@flinkbot run azure |
…inputGates [FLINK-38804][runtime] Ensure channelStateWriter is closed after the inputGates
e40312d to
bf9abb7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is the purpose of the change
Ensure the RemoteInputChannel (or remote components) is closed before ChannelStatePersister and ChannelStateWriteRequestExecutorImpl.
Dueing TaskManager shutdown sequence, ChannelStateWriteRequestExecutorImpl is being closed prematurely while RemoteInputChannel is still active. If a new buffer arrives, the active RemoteInputChannel attempts to use the already-closed executor, resulting in the failure.
Brief change log
Bubble ChannelStateWriter up from the StreamTask to Task, and close it after the InputGates.
Verifying this change
This change added tests and can be verified as follows:
Does this pull request potentially affect one of the following parts:
@Public(Evolving): (no)Documentation